﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category7
{
  public class MT711 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagSubItemDefinition U0004;
    private static SwiftTagDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagDefinition U000E;
    private static SwiftTagDefinition U000F;
    private static SwiftTagDefinition U0010;

    [Description("Sequence Of Total")]
    public Tag27 SequenceOfTotal_27
    {
      get
      {
        return new Tag27((SwiftElement) this, 0, (SwiftDefinitionElement) MT711.U0002);
      }
    }

    [Description("Sequence Of Total")]
    public Tag27 Tag27_SequenceOfTotal
    {
      get
      {
        return this.SequenceOfTotal_27;
      }
    }

    [Description("Senders Reference")]
    public Tag20 SendersReference_20
    {
      get
      {
        return new Tag20((SwiftElement) this, 0, (SwiftDefinitionElement) MT711.U0005);
      }
    }

    [Description("Senders Reference")]
    public Tag20 Tag20_SendersReference
    {
      get
      {
        return this.SendersReference_20;
      }
    }

    [Description("Documentary Credit Number")]
    public Tag21 DocumentaryCreditNumber_21
    {
      get
      {
        return new Tag21((SwiftElement) this, 0, (SwiftDefinitionElement) MT711.U0007);
      }
    }

    [Description("Documentary Credit Number")]
    public Tag21 Tag21_DocumentaryCreditNumber
    {
      get
      {
        return this.DocumentaryCreditNumber_21;
      }
    }

    [Description("Description of Goods and/or Services")]
    public Tag45B DescriptionOfGoods_45B
    {
      get
      {
        return new Tag45B((SwiftElement) this, 0, (SwiftDefinitionElement) MT711.U000E);
      }
    }

    [Description("Description of Goods and/or Services")]
    public Tag45B Tag45B_DescriptionOfGoods
    {
      get
      {
        return this.DescriptionOfGoods_45B;
      }
    }

    [Description("Documents Required")]
    public Tag46B DocumentsRequired_46B
    {
      get
      {
        return new Tag46B((SwiftElement) this, 0, (SwiftDefinitionElement) MT711.U000F);
      }
    }

    [Description("Documents Required")]
    public Tag46B Tag46B_DocumentsRequired
    {
      get
      {
        return this.DocumentsRequired_46B;
      }
    }

    [Description("Additional Conditions")]
    public Tag47B AdditionalConditions_47B
    {
      get
      {
        return new Tag47B((SwiftElement) this, 0, (SwiftDefinitionElement) MT711.U0010);
      }
    }

    [Description("Additional Conditions")]
    public Tag47B Tag47B_AdditionalConditions
    {
      get
      {
        return this.AdditionalConditions_47B;
      }
    }

    public MT711()
      : base(true)
    {
    }

    public MT711(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT711.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT711.MessageDefinition = new SwiftMessageDefinition("MT711", "Advice of a Third Bank’s Documentary Credit");
      MT711.U0002 = new SwiftTagDefinition("SequenceOfTotal_27", "Sequence Of Total");
      MT711.U0002.TagName = ":27:";
      MT711.U0003 = new SwiftTagSubItemDefinition("Number", "Number");
      MT711.U0002.Elements.Add((SwiftDefinitionElement) MT711.U0003);
      MT711.U0004 = new SwiftTagSubItemDefinition("Total", "Total");
      MT711.U0002.Elements.Add((SwiftDefinitionElement) MT711.U0004);
      MT711.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT711.U0002);
      MT711.U0005 = new SwiftTagDefinition("SendersReference_20", "Senders Reference");
      MT711.U0005.TagName = ":20:";
      MT711.U0006 = new SwiftTagSubItemDefinition("Reference", "Reference");
      MT711.U0005.Elements.Add((SwiftDefinitionElement) MT711.U0006);
      MT711.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT711.U0005);
      MT711.U0007 = new SwiftTagDefinition("DocumentaryCreditNumber_21", "Documentary Credit Number");
      MT711.U0007.TagName = ":21:";
      MT711.U0008 = new SwiftTagSubItemDefinition("Reference", "Documentary Credit Number");
      MT711.U0007.Elements.Add((SwiftDefinitionElement) MT711.U0008);
      MT711.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT711.U0007);
      MT711.U000E = new SwiftTagDefinition("DescriptionOfGoods_45B", "Description of Goods and/or Services");
      MT711.U000E.TagName = ":45B:";
      MT711.U000E.Mandatory = false;
      MT711.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT711.U000E);
      MT711.U000F = new SwiftTagDefinition("DocumentsRequired_46B", "Documents Required");
      MT711.U000F.TagName = ":46B:";
      MT711.U000F.Mandatory = false;
      MT711.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT711.U000F);
      MT711.U0010 = new SwiftTagDefinition("AdditionalConditions_47B", "Additional Conditions");
      MT711.U0010.TagName = ":47B:";
      MT711.U0010.Mandatory = false;
      MT711.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT711.U0010);
    }
  }
}
